package com.lww.feature.aop;

import org.springframework.aop.ThrowsAdvice;

import java.lang.reflect.Method;

/**
 * User: yian
 * Date: 2018/9/2
 */
public class ThrowAdvice  implements ThrowsAdvice {

    public void afterThrowing(Method method, Object[] args, Object obj , Exception ex)throws Throwable
    {
        System.out.println("------------------------");
        System.out.println("------异常抛出增强");
        System.out.println("------method "+method.getName());
        System.out.println("------exception "+ex.getMessage());
        System.out.println("------------------------");
    }
}
